#ifndef _SC_SYSTEMCLOCK_H_
#define _SC_SYSTEMCLOCK_H_

#include "..\Global.h"

#if (defined _SC8F073 | defined _SC8F083)
#define OSCCON_FHSI_1       0b01110000
#define OSCCON_FHSI_2       0b01100000
#define OSCCON_FHSI_4       0b01010000
#define OSCCON_FHSI_8       0b01000000
#define OSCCON_FHSI_16      0b00110000
#define OSCCON_FHIS_32      0b00100000
#define OSCCON_FHIS_64      0b00010000
#define OSCCON_FLSI         0b00000000

#define SET_FCPU_16M()      do{OSCCON = OSCCON_FHSI_1;}while(0)
#define SET_FCPU_8M()       do{OSCCON = OSCCON_FHSI_2;}while(0)
#define SET_FCPU_4M()       do{OSCCON = OSCCON_FHSI_4;}while(0)
#define SET_FCPU_2M()       do{OSCCON = OSCCON_FHSI_8;}while(0)
#define SET_FCPU_1M()       do{OSCCON = OSCCON_FHSI_16;}while(0)
#define SET_FCPU_500K()     do{OSCCON = OSCCON_FHSI_32;}while(0)
#define SET_FCPU_250K()     do{OSCCON = OSCCON_FHSI_64;}while(0)
#define SET_FCPU_32K()      do{OSCCON = OSCCON_FLSI;}while(0)
#endif

#endif